{include file="public/head" /}
<body>
{include file="public/menu" /}
<link rel="stylesheet" href="/static/hry/dist/css/swiper.min.css">
<div class="details">
    <img src="/static/hry/images/project.jpg" alt="" style="width: 100%">
    {if $data.id === 35}
    <div class="wrap" id="noContentWrapper" style="visibility: hidden">
        <div class="top">
            <div class="pic" >
                <div class="swiper-banner-container">
                    <div class="swiper-wrapper">
                        {volist name="data.thumb" id="banner" key='id'}
                        <div class="swiper-slide">
                            {if condition=" (session('UID')) AND (session('isCheck') neq 1 )"}
                            <img src="{$banner}"  alt="" style="width: 100%"/>
                            {else}
                            <img src="{$banner}"  alt="" style="width: 100%"/>
                            {/if}
                        </div>
                        {/volist}
                    </div>
                    <!-- 如果需要分页器 -->
                    <div class="swiper-pagination"></div>

                </div>
            </div>
            <div class="info">
                <h2>{$data.project_name}</h2>
                <div class="p1">
                    {:Gettags($data.tags)}
                </div>
                <div class="money">已筹金额<span>￥{:GetProjectBar($data.id)}</span></div>
                <progress value="{:GetProjectBar($data.id)}" max="{$data.target_code}"></progress>
                <div class="p2">
                    <span class="fl">当前进度{:GetProjectBar($data.id,1)}</span>
                    <!-- <span class="fr">剩余{:OverTime($data.end_time)}</span> -->
                </div>
                <div class="p3">

                    <div>目标金额：{$data.target_code}元</div>
                    <div>剩余天数：{if condition="$data.status >= 3"}0天0时0分{else /}{:OverTime($data.end_time)}{/if}</div>
                </div>
                <div class="p4">我已支持：￥{$hasMoney|default=0}</div>

                {if condition="$data.status >= 3"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">众筹成功</a>
                {elseif condition="$data.status eq -1"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">众筹失败</a>
                {elseif condition="$data.status eq 1"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">预热中</a>
                {else /}
                {if condition="session('UID')"}
                <a href="JavaScript:(0)" class="rt" onclick="ShowBox()">我要认投</a>
                {else}
                <a href="{:url('Login/index')}" class="rt">我要认投</a>
                {/if}
                {/if}

            </div>
            <div class="clear"></div>
        </div>
        <div class="bottom">
            <div class="left fl">
                <div class="subnav" id="subnav">
                    <span class="ac">项目详情</span>
                    <span>项目动态</span>
                    <span>合作详情</span>
                </div>
                <ul class="content" id="b-l-content">
                    <li class="show">{$data.des}</li>
                    <li>
                        <div class="list">
                            <div class='xmdt-list'>
                                {volist name="newList" id="new"}
                                <div class='xmdt-item'>
                                    <a href="{:url('detail/index',['id'=>$new.id])}" class="pic"><img src="{$new.litpic}" alt="{$new.title}"></a>
                                    <a href="{:url('detail/index',['id'=>$new.id])}" class="words">
                                        <h2>{$new.title}</span><span class="s2"></h2>
                                        <h3>{$new.update_time}</h3>
                                        <p>{:mb_substr($new.description,0,75)}...</p>
                                        <div class="more">more ></div>
                                    </a>
                                </div>
                                {/volist}
                            </div>
                        </div>
                    </li>
                    <li>{$data.detail}</li>
                </ul>
            </div>
            <div class="right fr">
                {if condition=" !empty($initiator) "}
                <div class="item1">
                    <div class="title">项目发起方</div>
                    <p>
                        <a href="javascript:void(0);" target="_blank"><img src="/uploads/projectuser/logo/{$initiator.logo}" width="80"></a>
                        <span id="item1-words">{$initiator.company_intro}</span>
                    </p>
                    <div class="more" id="more1"><span class="wz">展开更多</span><span class="icon"></span></div>
                </div>
                {/if}
                <div class="item2">
                    <div class="title">风险说明</div>
                    <p><span id="item2-words">{$data.risk}</span></p>
                    <div class="more" id="more2"><span class="wz">展开更多</span><span class="icon"></span></div>
                </div>

            </div>
            <div class="clear"></div>
        </div>
    </div>
    {else}
    <div class="wrap">
        <div class="top">
            <div class="pic" >
                <div class="swiper-banner-container">
                    <div class="swiper-wrapper">
                        {volist name="data.thumb" id="banner" key='id'}
                        <div class="swiper-slide">
                        {if condition=" (session('UID')) AND (session('isCheck') neq 1 )"}
                        <img src="{$banner}"  alt="" style="width: 100%"/>
                        {else}
                        <img src="{$banner}"  alt="" style="width: 100%"/>
                        {/if}
                        </div>
                        {/volist}
                    </div>
                    <!-- 如果需要分页器 -->
                    <div class="swiper-pagination"></div>

                </div>
            </div>
            <div class="info">
                <h2>{$data.project_name}</h2>
                <div class="p1">
                    <span class="tag">
                        {:Gettags($data.tags)}
                    </span>
                </div>
                <div class="money"><span>已筹金额￥{:GetProjectBar($data.id)}</span></div>
                <progress value="{:GetProjectBar($data.id)}" max="{$data.target_code}"></progress>
                <div class="p2">
                    当前进度{:GetProjectBar($data.id,1)}
                </div>
                <div class="p3">

                    <div><span>目标金额</span>{$data.target_code}元</div>
                    <div><span>剩余天数</span>{if condition="$data.status >= 3"}0天0时0分{else /}{:OverTime($data.end_time)}{/if}</div>
                    <div><span>我已支持</span>￥{$hasMoney|default=0}</div>
                </div>
                {if condition="$data.status >= 3"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">众筹成功</a>
                {elseif condition="$data.status eq -1"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">众筹失败</a>
                {elseif condition="$data.status eq 1"}
                <a href="JavaScript:(0)" class="rt" style="background-color:#cccccc;">预热中</a>
                {else /}
                {if condition="session('UID')"}
                <a href="JavaScript:(0)" class="rt" onclick="ShowBox()">我要认投</a>
                {else}
                <a href="{:url('Login/index')}" class="rt">我要认投</a>
                {/if}
                {/if}

            </div>
            <div class="clear"></div>
        </div>
        <div class="team">
            {if condition=" !empty($initiator) "}
            <div class="item1 item">
                <div class="title">项目发起方</div>
                <p>
                    <a href="javascript:void(0);" target="_blank"><img src="/uploads/projectuser/logo/{$initiator.logo}"  width="80"></a>
                    <span id="item1-words">{$initiator.company_intro}</span>
                </p>
                <div class="more" id="more1"><span class="wz">展开更多</span><span class="icon"></span></div>
            </div>
            {/if}
            <div class="item2 item">
                <div class="title">风险说明</div>
                <p><span id="item2-words">{$data.risk}</span></p>
                <div class="more" id="more2"><span class="wz">展开更多</span><span class="icon"></span></div>
            </div>
        </div>
        <div class="bottom">
            <div class="left f1">
                <div class="subnav" id="subnav">
                    <span class="ac">项目详情</span>
                    <span>项目动态</span>
                    <span>合作详情</span>
                </div>
                <ul class="content" id="b-l-content">
                   <li class="show">{$data.des}</li>
                   <li>
                       {if condition="$newList->isEmpty()"}
                       <div style="width:100%;text-align:center;padding-top:5%;">
                           <img src="__static__/hry/images/nodata.png" style="width:50%;margin: 0 auto;" />
                           <p style="color:#999">暂无项目动态~</p>
                       </div>
                       {/if}
						<div class="list">
							<div class='xmdt-list'>
							{volist name="newList" id="new"}
								<div class='xmdt-item'>
									<a href="{:url('detail/index',['id'=>$new.id])}" class="pic"><img src="{$new.litpic}" alt="{$new.title}"></a>
									<a href="{:url('detail/index',['id'=>$new.id])}" class="words">
										<h2>{$new.title}</span><span class="s2"></h2>
										<h3>{$new.create_time}</h3>
										<p>{:mb_substr($new.description,0,75)}...</p>
										<div class="more">more ></div>
									</a>
								</div>
							{/volist}
							</div>
						</div>
				   </li>
                   <li>{$data.detail}</li>
                </ul>
            </div>
        </div>
    </div>
    {/if}
    <div class='alert-rt' id="alert-rt">
        <div class='box'>
            <h2>
                <span class='title'>支持详情</span>
                <span class='close' onclick="CloseBox()"></span>
            </h2>
            <div class="popUpB-sum clearfix">
                {if condition="$data.project_type eq '1'"}
                <p class="popUpB-sum-title">支持金额：</p>
                <ul class="popUpB-sum-ul clearfix">
                    <li>
                        <div>
                            <input type="text" id="J-project-money" placeholder="请输入金额">
                            <p class='dw'>元</p>
                        </div>
                        <p class="tips J-tips"></p>
                    </li>
                    <li>
                        <p>余额：
                            <span>{$money}</span>元</p>
                        <p class="pointer J-chongzhi" onclick='location.href="{:url('Member/recharge')}"' style="cursor:pointer;">充值</p>
                    </li>
                </ul>
                {/if}
                {if condition="$data.project_type eq '2'"}
                <p class="popUpB-sum-title">支持份数：</p>
                <ul class="popUpB-sum-ul clearfix">
                    <li>
                        <div>
                            <input type="text" id="J-project-number" placeholder="请输入份数" onkeyup="checkFe(this)" >
                            <p class='dw'>￥{$data.single_mon}/份</p>
                        </div>
                        <p class="tips J-tips"></p>
                    </li>
                    <li>
                        <p>余额：
                            <span>{$money}</span>元</p>
                        <p class="pointer J-chongzhi" onclick='location.href="{:url('Member/recharge')}"' style="cursor:pointer;">充值</p>
                    </li>
                </ul>
                {/if}
            </div>
            <div class="popUpB-protocol" id="J-popUpB-protocol">
                <div class="protocol">
                    <h2>投资风险提示书</h2>
                    <p>本注册投资者（下称“本投资者”）郑重承诺如下：</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一、本投资者具有相应合法的众筹投资资格，不存在任何法律、行政法规、中国证券监督管理委员会等规范性文件及交易规则禁止或限制众筹投资的情形。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;二、本投资者在投资本平台众筹项目时，提供的所有证件、资料均真实、全面、有效、合法，并且保证资金来源合法。 </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;三、本投资者即为众筹投资账户的实际持有人和实际受益人。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;四、本投资者已经认真阅读下述风险揭示函之内容。</p>


                    <h2>投资风险揭示函</h2>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span><b>郑重提示：</b></span>在进行投资前，投资人应仔细阅读投资者承诺及风险揭示函，确保自己完全理解该项投资的性质和所涉及的风险，在慎重考虑后自行决定购买与自身风险承受能力相匹配的项目；在进行投资后，投资应随时关注相关的信息披露情况，及时获取相关信息。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本平台是为使投资人更好地了解本平台所发布的项目的风险，特此提供本风险揭示书，请认真详细阅读，慎重决定是否进行众筹投资。</p>


                    <p class="protocol-content-title"><b>一、常规风险</b></p>
                    <p>（一）政策风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;目标项目所处行业的法律、法规及相关政策若发生变化，可能导致目标项目业务经营环境的恶化，引起目标项目经营情况和周期的波动。</p>
                    <p>（二）被投资项目业绩风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;影视剧投资风险较高，票房不可确定性较强，受到档期、同期上映电影、市场偏好、审核部门监管等多方面因素综合影响，从而最终影响影视剧的收益。影视众筹商业模式不够完善，影视众筹发展时间较短，相关运作体制尚未完善，存在一定技术风险、信用风险和管理风险。</p>
                    <p>（三）管理风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;影视剧项目的核心团队组成人员的管理，包括导演、编剧、演员等的合理搭配、变动等因素可能会出现意外情况，从而影响项目的拍摄、审批、放映等流程进度，影响项目的收益。</p>
                    <p>（四）信用风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;项目企业在交易过程中可能发生交易违约或者所投资企业倒闭、信用评级被降低、违约、拒绝支付到期股息红利的情况，从而导致项目收益损失。</p>
                    <p>（五）合规性风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;指项目企业在管理或运作过程中，违反国家法律、法规的规定，或者其他监管规定所产生的风险。</p>
                    <p>（六）项目企业认知风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可能存在由于项目企业缺乏足够的认知和了解而造成的投资风险。</p>
                    <p>（七）资金保管人风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;资金保管人因重大违法、违规行为，受到行政处罚、被取消业务资格等，或因资金保管人停业、解散、破产、撤销等原因，不能履行相应职责而导致项目企业终止的风险。</p>
                    <p>（八）突发偶然事件的风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;指超出平台自身直接控制能力之外的风险，可能导致项目企业的利益受损。其中“突发偶然事件”指任何无法预见、不能避免、无法克服的事件或因素。</p>
                    <p>（九）技术风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本平台可能因设备故障、通信中断、网络攻击、病毒入侵等原因出现系统故障而导致平台服务终止或者收益权融资项目信息无法正常和准确地显示。</p>
                    <p>（十）其他本平台无法预见、无法避免或无法控制的风险。</p>

                    <p class="protocol-content-title"><b>二、特定风险</b></p>
                    <p>除了以上常规风险外，还将面临以下特定风险：</p>
                    <p>（一）投资失败风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您与其他投资人可能未能成功投资项目，可能是因为项目最终未能达到预期的融资金额或者是其他投资人或项目方原因。</p>
                    <p>（二）提前终止风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在项目运营期间，出现法律或者约定的导致项目企业项目必须停止的情形，导致项目最终流产。</p>
                    <p>（三）投资亏损风险</p>
                    <p class="content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;投资人非常明确以及清楚投资有风险，任何投资均不能保证一定获得收益，本项目同样存在亏本的风险，譬如票房没有达到预期目标，甲方投资人的投资金额会根据具体情况不同而导致最终回收成本低于投资本金或者全部亏损。</p>


                    <p class="protocol-content-title"><b>三、了解自身特点，慎重选择</b></p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;由于影视剧自身的特点，资金占用时间长，回报率不高，甚至有亏损本金的高风险，拟投资前，应认真阅读并理解相关文件的全部内容，应综合考虑自身的资产与收入状况、投资经验、风险偏好，慎重选择投资项目。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本风险揭示书的揭示事项仅为列举性质，未能详尽列明拟投资所面临的全部风险和可能导致拟投资资产损失的所有因素。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;投资前应认真阅读并理解文件的全部内容，并确信自身已做好足够的风险评估与财务安排，避免因投资而遭受难以承受的损失。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本平台及保管银行不以任何方式向您做出保证其资产本金不受损失或者保证其取得最低收益的承诺。</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>声明：您承诺已经全面理解本说明书的全部条款，尤其是本说明书中的风险揭示条款，充分认识到投资本项目可能面临的风险，并自愿承担相关风险，特此确认。</b></p>

                </div>
            </div>
            <div class="popUpB-notarize J-popUpB-notarize clearfix">
                <div class="J-popUpB-consent popUpB-notarize-but pointer" data-notarize="ok" onclick="AgreeXY(this)">
                    <i class=''>
                        <img src="__STATIC__/hry/images/gou.png" alt="">
                    </i>
                    <p>同意</p>
                </div>
                <div class="J-popUpB-disagree popUpB-notarize-but pointer" data-notarize="no" onclick="AgreeXY(this)">
                    <i>
                        <img src="__STATIC__/hry/images/gou.png" alt="">
                    </i>
                    <p>不同意</p>
                </div>
            </div>
            <button type="button" class="popUpB-but J-submit back pointer" id="J-submit" disabled style='border:none;cursor:pointer;'>
                <!--<button type="button" class="popUpB-but J-submit back pointer"  disabled style='border:none;cursor:pointer;'>-->
                确定支持
            </button>
        </div>
    </div>
    <div class="modal fade" tabindex="-1" role="dialog" id="myModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">请输入密码</h4>
                </div>
                <div class="modal-body">
                    请输入密码： <input type="password" id="psw" onkeydown="keyup_submit(event);">
                </div>
                <div class="modal-footer">
                    <button type="button" id="tijiao" class="btn btn-primary">提交</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
</div>

{load href="__static__/global/bootstrap/css/bootstrap.min.css" /}
{load href="__static__/global/bootstrap/css/font-awesome.min.css" /}

{include file="public/foot" /}
<script src="/static/hry/dist/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
</body>
{include file="public/load_bottom" /}
<style>
    .modal-backdrop.in{
        opacity: 1 !important;
    }
    .swiper-banner-container{
        overflow: hidden;
    }
    .swiper-pagination{
        position: relative;
    }
</style>

<script>

    $(function () {
        if($(".swiper-banner-container .swiper-slide").size() != 1){
            var bannerSwiper = new Swiper ('.swiper-banner-container', {
                speed: 1000,
                autoHeight: true,
                autoplay: {
                    delay: 3000
                },
                autoplayDisableOnInteraction : false,
                loop: true, // 循环模式选项
                // 如果需要分页器
                pagination: {
                    el: '.swiper-pagination',
                    clickable: true
                },

                // 如果需要前进后退按钮
                navigation: {
                    nextEl: '.swiper-button-next',
                    prevEl: '.swiper-button-prev',
                },
            });
        }
        // 轮播图

        textLength();
        subNav();
        getId()

    })
    function getId() {
        let ids = window.location.href.split('/')
        let id = ids[ids.length-1]
        if(id === '35' || id === '30' || id === '36'|| id === '47') {
            $('#myModal').modal({
                backdrop: 'static', //点击遮罩层不会被关闭
                keyboard: false //按下esc键不会被关闭
            })
            $('#myModal').modal('show')
        }
    }
    function keyup_submit(e){
     var evt = window.event || e;
     if (evt.keyCode == 13){
         $('#tijiao').trigger('click')
     }
    }
    $('#tijiao').click(function () {
        if($('#psw').val() === '3003' ) {
            $('#myModal').modal('hide')
            $('#noContentWrapper').css('visibility', 'visible' )
        } else {
            window.location.href = 'https://www.hrycf.com/'
        }
    })
    function textLength(){
        var words = $('#item1-words')
        var text = words.text()
        var words2 = $('#item2-words')
        var text2 = words2.text()
        if(text.length>57){
            var a = text.substring(0,54)
            words.text(a+'...')
        }
        $('#more1').click(function(){
            $(this).toggleClass('acmore')
            if($(this).is('.acmore')){
                $(this).find('.wz').text('收起')
                words.text(text)
            }
            else {
                $(this).find('.wz').text('展开更多')
                words.text(text.substring(0,54)+'...')
            }
        })
        if(text2.length>132){
            var b = text2.substring(0,132)
            words2.text(b+'...')
        }
        $('#more2').click(function(){
            $(this).toggleClass('acmore')
            if($(this).is('.acmore')){
                $(this).find('.wz').text('收起')
                words2.text(text2)
            }
            else {
                $(this).find('.wz').text('展开更多')
                words2.text(text2.substring(0,132)+'...')
            }
        })

    }
    function subNav() {
        var span = $('#subnav').find('span')
        var li = $('#b-l-content').find('li')
		//console.log(li.length)
        span.click(function () {
            var index = $(this).index()
            $(this).addClass('ac').siblings().removeClass('ac')
            li.eq(index).addClass('show').siblings().removeClass('show')
        })
    }
	function ShowBox(){
        if(parseInt("{$wantToLookinto}") == 1){
            layer.alert('尊敬的用户：您尚未进行风险评估或您的风险评估已过期，请前往评估',{
                icon: 3,
                skin: 'layer-ext-moon',
                btn: '前往评估'
            },function(){
                window.location.href = "{:url('Member/lookinto')}"
            });
        }else if(parseInt("{$LookIntoScore}") < 29){
            layer.alert('您的投资类型评估不符合条件，请前往个人中心重新评估。',{
                icon: 3,
                skin: 'layer-ext-moon',
                btn: '重新评估'
            },function(){
                window.location.href = "{:url('Member/lookinto')}"
            });
        }else{
            $("#alert-rt").show();
        }

	}
	function CloseBox(){
		$("#alert-rt").hide();
	}
	function AgreeXY(obj){
		var notarize = $(obj).attr("data-notarize");
		var Jsubmit = $("#J-submit");
		if(notarize == 'ok'){
			Jsubmit.attr('disabled',false);
			Jsubmit.css('background-color','#f78e24');
		}else{
			Jsubmit.attr('disabled',true);
			Jsubmit.css('background-color','#ddd');
		}
	}
	$('.popUpB-notarize-but').click(function(){
		$(this).find('i').addClass('show')
		$(this).siblings().find('i').removeClass('show')
	})
	
	function checkFe(obj){
		var vl = $(obj).val()
		var single_mon = "{$data.single_mon}" * 1
		if(!/^[1-9]\d*$/.test(vl)){
			layer.msg('只能整数');
			$(obj).val('');
			$(".J-tips").text('')
		}else{
			mn = vl * single_mon 
			$(".J-tips").text('支付金额￥'+mn.toFixed(2))
		}
	}
	
	$("#J-submit").click(function(){
		var project_type = "{$data.project_type}";
		var selfmoney = "{$money}"*1;
		if(project_type == 1){
		     var reg = /^[1-9]\d*0{2}$/;
 			var money = $("#J-project-money").val();
			if(!reg.test(money)){
				layer.msg('请输入100的整数倍');

				return false;
			}
		}else{
			var number = $("#J-project-number").val();
			var single_mon = "{$data.single_mon}" * 1;
			if(number == '' || number == 0){
				layer.msg('请输入有效份额');
				return false;
			}
			var money = number * single_mon;
		}
		if(money>selfmoney){
			layer.msg('余额不足 请先充值');
			return false;
		}	
		if(money<=0){
			layer.msg('请输入有效金额');
			return false;
		}		
		$('#J-submit').attr('disabled',true);
		var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2			console.log($('#J-submit'))
		$.ajax({
			url: "{:url('Order/create')}",
			type: "POST",
			dataType: "JSON",
			data: {id:"{:input('id')}",money:money},
			success: function(msg){
				layer.close(index);							
				$('#J-submit').attr('disabled',false);
				layer.msg(msg.info);
				if(msg.status == 1){
					window.location.href=msg.url;
				}
			}
		})
	})
</script>
</html>